package
{
	import flash.display.Sprite;
	import flash.events.ErrorEvent;
	import flash.events.Event;
	import flash.events.UncaughtErrorEvent;
	import flash.geom.Vector3D;
	import flash.utils.setInterval;
	
	import level4.display.colors.Colors;
	import level4.display.GameDispose;
	import level4.level4;
	
	public class VisibleTest extends Sprite
	{
		public function VisibleTest()
		{
			//			var gd:GameDispose = setup();
			//			addChild(gd);
			var gd1:GameDispose = setup();
			addChild(gd1);
			gd1.x = 400;
			
			setInterval(function():void{
				trace(numChildren);
				gd1.x -= 30;
				trace(gd1.x,gd1.parent);
			},1000);
		}
		private function setup():GameDispose{
			var gd:GameDispose = new GameDispose();
			gd.graphics.beginFill(0xffffff*Math.random());
			gd.graphics.drawRect(0,0,40,30);
			gd.graphics.endFill();
			return gd;
		}
	}
}